﻿@model Yeap.Models.CommentBlockModel

@if (Model.Comments.Count > 0)
{
    foreach(var comment in Model.Comments)
    {
         <div class="comment">
            <div class="commentAuthor">@comment.User.FullName</div>
            <div class="commentDate">@comment.Date.ToString()</div>
            <div class="commentText">@comment.Text</div>
         </div>
     }
}
else
{
    <text>
        Комментариев нет
    </text>
}

@using (Html.BeginForm("AddComment", "Work", FormMethod.Post))
{
    @Html.TextArea("commentText");
    @Html.Hidden("workId", Model.Work.Id);                                 
    <input type="submit" value="Сохранить" /> 
}